/******************************************************************
 * @version      : 1.0
 * @Author       : zhl
 * @Date         : 2023-06-27 17:04:20
 * @LastEditors  : zhl
 * @E-Mail       : zhll168@163.com
 * @Description  : 业务描述
 ******************************************************************/
#ifndef __DLT698_MANAGER_H__
#define __DLT698_MANAGER_H__
#include "DLT698-Frame.h"
#include "APDU.h"

class DLT698Manager
{
private:
    /* data */
    static DLT698Manager c_dlt698_manager;
    DLT698_FRAME c_dlt698_frame;
    bool c_is_lead_code;

public:
    DLT698Manager(/* args */);
    ~DLT698Manager();

    static DLT698Manager& get_instance();
    void init();
    void set_lead_code(DLT698_FRAME& dlt698_frame, uint8_t *lc);
    void set_scrambling_code(DLT698_FRAME& dlt698_frame, uint8_t sbc);
    void set_control_code(DLT698_FRAME& dlt698_frame, uint8_t c);
    int  set_slave_addr(DLT698_FRAME& dlt698_frame, std::string slave_addr);
    int  packet_frame(DLT698_FRAME& dlt698_frame, uint8_t *frame, int frame_len, APDU &apdu);
};




#endif /* __DLT698_MANAGER_H__ */